﻿using UnityEngine;
using System.Collections;
using Sa1;

public class CameraMovement : MonoBehaviour {

    public Transform cameraAim;
    public float smoothMove;

    private float _cameraZ;

    // Use this for initialization
    void Start() {
        _cameraZ = transform.position.z;
    }

    // Update is called once per frame
    void LateUpdate() {
        if (cameraAim == null) return;
        transform.position = Vector3.Lerp(transform.position, cameraAim.position, smoothMove).withZ(_cameraZ);
    }
}
